package com.distributeredis.redis_springboot.springcache.service.impl;

import com.distributeredis.redis_springboot.springcache.mapper.UserDao;
import com.distributeredis.redis_springboot.springcache.service.UserService;
import com.distributeredis.redis_springboot.springcache.vo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl  implements UserService {
    @Autowired
    private UserDao userDao;
    @Override
    public void save(User user) {
        userDao.save(user);
    }

    @Override
    public int removeById(Long id) {
        return userDao.removeById(id);
    }

    @Override
    public int updateById(User user) {
        return userDao.updateById(user);
    }

    @Override
    public User getById(Long id) {
        return userDao.getById(id);
    }
}
